<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=utf-8" 
import="java.util.*"
pageEncoding="utf-8"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>

<% String appName = request.getContextPath(); %>
<html >
<head>
 <meta charset="UTF-8">
<meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>分拣机接口</title>
</head>
<link rel="stylesheet" type="text/css" href="<%=appName%>/js/themes/bootstrap/easyui.css">
<script type="text/javascript" src="<%=appName %>/js/jquery.min.js"></script>
<script type="text/javascript" src="<%=appName %>/js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=appName %>/js/jquery.edatagrid.js"></script>
<link rel="stylesheet" type="text/css" href="<%=appName %>/js/themes/icon.css">
<body id="mylayout" class="easyui-layout">
<div data-options="region:'west',title:'功能导航',split:true" style="width:250px;">
<ul id="tt" class="easyui-tree" data-options="">
    <shiro:authenticated>  <li><span >定时任务管理</span></li></shiro:authenticated>
    <li><span>数据库链接查看</span></li>
    <li><span>WebService-wsdl</span></li>
    <shiro:hasRole name="ADMIN">
    <li data-options="state:'closed'"><span>用户权限管理</span>
    <ul id="tt" >
        <li><span>用户管理</span></li>
        <li><span>角色管理</span></li>
        <li><span>权限管理</span></li>
    </ul></li></shiro:hasRole>
    <shiro:authenticated><li><span>修改密码</span></li></shiro:authenticated>
    <shiro:authenticated>  <li><span ><a href="<%=request.getContextPath()%>/mvc/loginCtrl/logout" target="_self" style="float:right">退出登录</a></span></li></shiro:authenticated>


</div>


<div id="layout-main" data-options="region:'center',title:'welcome'" style="padding:5px;background:#eee;">
<!-- <iframe id="pageurl" style="width:100%;height:600px"></ifranme> -->
</div>




<%-- <div class="easyui-panel" data-options="collapsible:true," title="导航" style="width:250px;heigth:100%" >
    <ul id="tt" class="easyui-tree" data-options="">
    <shiro:authenticated>  <li><span >定时任务管理</span></li></shiro:authenticated>
    <li><span>数据库链接查看</span></li>
    <li><span>WebService-wsdl</span></li>
    <shiro:hasRole name="ADMIN"> <li><span>用户管理</span></li></shiro:hasRole>
    <shiro:authenticated><li><span>修改密码</span></li></shiro:authenticated>
    
</ul>
</div>

<div class="easyui-panel" data-options="" title="" style="heigth:100%" >

</div> --%>
</body>
<script type="text/javascript">
$('#tt').tree({
    onClick: function(node){
        if("定时任务管理" == node.text) {
        	
        	$("#mylayout").layout('panel', 'center').panel({ title: node.text });
        	//$("#mylayout").layout('panel', 'center').panel({ href: "index.jsp" });
        	$("#layout-main").panel({ href: "<%=appName%>/jsp/index.jsp" });
        	$("#layout-main").panel('refresh'); 
        	return;
        }
        if("数据库链接查看" == node.text){
        	window.open("<%=appName%>/druid"); 
        }
        if("WebService-wsdl" == node.text){
        	window.open("<%=appName%>/axis2-web/index.jsp"); 
        }
        if("用户管理" == node.text){
            $("#mylayout").layout('panel', 'center').panel({ title: node.text });
            $("#layout-main").panel({ href: "<%=appName%>/jsp/security/usermanage.jsp" });
            $("#layout-main").panel('refresh'); 
        }
        if("角色管理" == node.text){
            $("#mylayout").layout('panel', 'center').panel({ title: node.text });
            $("#layout-main").panel({ href: "<%=appName%>/jsp/security/rolemanage.jsp" });
            $("#layout-main").panel('refresh'); 
        }
        if("权限管理" == node.text){
            $("#mylayout").layout('panel', 'center').panel({ title: node.text });
            $("#layout-main").panel({ href: "<%=appName%>/jsp/security/permissionmanage1.jsp" });
            $("#layout-main").panel('refresh'); 
        }
        if("修改密码" == node.text){
            $("#mylayout").layout('panel', 'center').panel({ title: node.text });
            $("#layout-main").panel({ href: "<%=appName%>/jsp/changePasswd.jsp" });
            $("#layout-main").panel('refresh'); 
        }
        
    }
});

</script>


</html>